#pragma once
#include <iostream>
#include <opencv2/opencv.hpp>

bool readFrame(cv::Mat& frame);

class Camera {
public:
    Camera() = default;
    ~Camera() = default;
    bool open(uint index, uint width, uint height, float fps, bool flag = false);
    void config(double brightness, double contrast, double saturation, double hue, double gain, double exposure);
    void measureFPS();
private:
    uint width;
    uint height;
    float fps;
};


class Video {
public:
    Video() = default;
    ~Video() = default;
    bool open(const char* path);
private:
    uint width;
    uint height;
    uint count;
    float fps;
};


class Recorder {
public:
    Recorder() = default;
    ~Recorder();
    bool open();
    void write(cv::Mat&);
    void getSavePath();
private:
    cv::VideoWriter recorder;
    char path[100];
    uint width = 900;
    uint height = 550;
    float fps = 25;
};
